<?php

namespace app\admin\validate;

use think\Validate;

class ClothmakingProduct extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'thickness1' => 'require|number|float',
        'thickness1_standard' => 'require|integer',
        'density1' => 'require|number|float',
        'density1_standard' => 'require|integer',
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'thickness1.require' => '厚度1不能为空',
        'thickness1.number' => '厚度1必须为数字',
        'thickness1_standard.require' => '厚度标准值不能为空',
        'thickness1_standard.integer' => '厚度标准值必须为整数',
        'density1.require' => '密度1不能为空',
        'density1.number' => '密度1必须为数字',
        'density1_standard.require' => '密度标准值不能为空',
        'density1_standard.integer' => '密度标准值必须为整数',
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['thickness1', 'thickness1_standard', 'density1', 'density1_standard'],
        'edit' => ['thickness1', 'thickness1_standard', 'density1', 'density1_standard'],
    ];
    
}
